import { MessageBox } from 'element-ui'
import router from '../../router'
export class ServerError500 extends Error {
    constructor(message) {
        message = message || '服务器异常'
        MessageBox({
            title: '提示',
            message,
            type: 'warning'
        })
        super(message);
    }
}
export class ServerError10400 extends Error {
    constructor(message) {
        message = message || '您没有登陆'
        MessageBox.alert(message, '提示', {
            confirmButtonText: '去登录',
            type: 'warning',
            center: true,
        }).then(() => {
            window.open('http://h5.cbda1984.com/login')
        })
    }
}
export class RequestError extends Error {
    constructor(message) {
        message = message || '您没有登陆'
        MessageBox({
            title: '提示',
            message,
            type: 'warning'
        })
        super(message);
    }
}
